<?php
$username = $_POST["username"];
include "./mysql.php";
$sql = "select * from t_users where username='${username}'";
$result = $mysqli->query($sql);
if ($result->num_rows) {
    //有这个用户名
    echo "true";
} else {
    //没有这个用户名
    echo "false";
}
